package File;

import java.io.*;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Ap0stoL2
 * Date: 2023-08-07
 * Time: 11:42
 */
//sancner 的一些测试
//Scanner读取
public class test3 {
    public static void main(String[] args) throws IOException, IOException {

        //这里可以充分体现出java字符流的底层就是调用字节流,只不过做了一层封装
        //因此构造字符流要用字节流
        try(InputStreamReader inputStream = new InputStreamReader(new FileInputStream("d:/test.txt"))){

            Scanner scanner = new Scanner(inputStream);
            String s= scanner.next();
            System.out.println(s);
        }
    }
}
